home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 79 / maccd 79.iso / multimedial / GL Tron / Source / gltron / todo2html.pl < prev    next >
Encoding:
Perl Script  |  2001-07-10  |  810 b   |  35 lines  |  [TEXT/CWIE]

  1. #/usr/bin/perl -w
  2.  
  3. $date = localtime;
  4. print "<html>\n",
  5.     "<head>\n",
  6.     "<title>GLtron TODO list (updated $date)</title>\n",
  7.     "<!-- generated by todo2html.pl, Andreas Umbach <marvin\@dataway.ch> -->\n",
  8.     "<style type=\"text/css\">\n",
  9.     "<-- h1,h2,h3,h4 { font-family:Helvetica; }\n",
  10.     "    th { font-family:Helvetica; }\n",
  11.     "    td { font-family:Helvetica; } -->\n",
  12.     "</style>\n",
  13.     "</head>\n",
  14.     "<body bgcolor=white><h2>GLtron TODO list</h2>\n",
  15.     "last update on <b>$date</b><p>\n";
  16.  
  17. $start = 1;
  18. while(<>) {
  19.     if(/^\(([^\)]*)\)/) {
  20.         $priority = $1;
  21.         s/^\($1\)//;
  22.         print "<tr> <td> $priority <td> ", $_, "\n";
  23.     } else {
  24.         if(! $start) {
  25.             print "</table>\n";
  26.         }
  27.         print "<h3>", $_, "\n";
  28.         print "<table border=1><tr><th>Priority<th>Task\n";
  29.         $start = 0;
  30.     }
  31. }
  32. print "</table>\n",
  33.     "</body></html>\n";
  34.  
  35.